import { ENUM_LOG_LEVEL } from "~/log";

import { ENUM_APP } from "@/droplet-bus/core.define";
import { getGateway, Gateway } from "@/droplet-bus/core.define";

import { OceanGateway } from "@/ocean-gateway/core.define";
import { SystemStat } from "@/ocean-gateway/core.define";

export const GateComSystemStatGateway: Gateway = getGateway(OceanGateway, "ocean_gate_com_system_stat");

/** 调整某个服务的日志登记（仅用于开发问题排查）*/
export type patchSystemStatDto = { app: ENUM_APP; level: ENUM_LOG_LEVEL };
export type patchSystemStatRes = patchSystemStatDto & SystemStat;

export interface GateComSystemStatInterfaceWithPrimary<T> {
  patch(dto: T & patchSystemStatDto): Promise<patchSystemStatRes>;
}
